import Mock from 'mockjs'

const Random = Mock.Random

let type = ['Redis', 'OPC', 'Influx']

let data = []
for (let i = 0;i < Random.integer(1,100);i ++) {
  let obj = {
    one: Random.string(1,10) + '_one',
    two: Random.string(1,10) + '_two',
    three: type[Random.integer(0,2)] + '_three',
    four: Random.string(1,10) + '_four',
    five: Random.string(1,10) + '_five',
    six: Random.string(1,10) + '_six',
    seven: Random.string(1,10) + '_seven',
    eight: Random.string(1,10) + '_eight',
    updating: false
  }
  data.push(obj)
}


Mock.mock('/data/arr', 'post', data)